home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
- pshader("
-
- ps_2_0
-
- def c3, 5, 1, 0.5, -0.95
- def c4, 20, 1, 0.5, -0.95
-
- dcl t0.xyzw ; reflection texgen
- dcl t1.xy ; noise1 uv coords
- dcl t2.xy ; noise2 uv coords
- dcl t3.xy ; chmury
- dcl t4.xy ; lightmap
- dcl t5.xy ; specular blik
-
- dcl_2d s0 ; reflection map
- dcl_2d s1 ; noise1
- dcl_2d s2 ; noise2
- dcl_2d s3 ; clouds
- dcl_2d s4 ; lightmap
- dcl_2d s5 ; splecular
-
-
- texld r1, t1, s1 ; noise
- texld r2, t2, s2 ; noise
- texld r3, t3, s3 ; clouds
- texld r4, t4, s4 ; A: terrain lightmap
- texld r5, t5, s5 ; splecular
-
- mul r0, r1, r2 ; creating noise
-
- mad r0, r0, c4.x, t0 ; ???
-
- texldp r0, r0, s0 ; wykrzywianie
-
-
- sub r3.a, c4.y, r3.a ;A: invering clouds opacity = clouds shadow
-
- mul r3.a, r3.a, r4.a ;A: clouds shadow * static shadows
-
- mad_sat r4.a, r3.a, c7.b, c7.a ;A: applying ambient
-
-
- mul r3.a, r3.a, r3.a ;A: clouds shadow * static shadows
- mul r3.a, r3.a, c5.a ;A: applying sun visibility to shadows
-
- mul r5.a, r5.a, r3.a ;applying shadows to specular
- mul r5, r5.a, c5 ;daycolor to specular
-
- add_sat r1.a, r1.a, r2.a
- sub r1, c4.y, r1.a ;invert noise
-
- mul r5, r5, r1 ;applying noise to specular
-
- sub r0.a, c4.y, r0.a ;invert noise
-
- mad_sat r0, r0, r4.a, r5 ;applying shadows and specular to reflection
-
-
- mov oC0, r0
-
-
-
- ")
-
-